# List Comprehensions

print([i for i in range(5)])

vec = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

print([num for elem in vec for num in elem])

# Dictionary Comprehensions

print({i: str(i) for i in range(5)})

my_dict = {1: "dog", 2: "cat", 3: "hamster"}

print({value: key for key, value in my_dict.items()})

# Set Comprehensions

my_list = [1, 2, 2, 3, 4, 5, 5, 7, 8]

my_set = {x for x in my_list}

print(my_set)
